package test;

import java.util.Random;

public class 评委打分 {
    public static void main(String[] args) {
        Random r = new Random();
        int[] a = new int[6];
        int sum = 0;
        for (int i = 0; i < a.length; i++) {
            a[i] = r.nextInt(101);
            sum += a[i];
        }
        int min = a[0];
        for (int i = 0; i < a.length; i++) {
            if (min > a[i]) {
                min = a[i];
            }
        }
        int max = 0;
        for (int i = 0; i < a.length; i++) {
            if (max < a[i]) {
                max = a[i];
            }
        }
        int avg = (sum - max - min) / 4;
        System.out.println(avg);
    }
}